﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="SiteColumnRecipe"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
 <Caption>Add Site Column</Caption>
  <HostData>
    <Icon File="spalm.ico" />
    <CommandBar Menu="SPALMItem"/>
  </HostData>
    <Arguments>
      <Argument Name="CurrentItem" Type="EnvDTE.ProjectItem, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.FirstSelectedItem, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>

      <Argument Name="SiteColumnID">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.GuidValueProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="SiteColumnName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="ColName" />
      </Argument>
      <Argument Name="SiteColumnGroup">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Custom Columns" />
      </Argument>
      <Argument Name="SiteColumnStaticName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="ColName" />
      </Argument>
      <Argument Name="SiteColumnType">
        <Converter Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Converters.SiteColumnTypeConverter, SteriaMummert.SharePoint.SoftwareFactoryLite" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Text" />
      </Argument>
      <Argument Name="SiteColumnColName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="ColName" />
      </Argument>
      <Argument Name="SiteColumnDisplayName">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Col Name" />
      </Argument>
      <Argument Name="SiteColumnReadOnly" Type="System.Boolean" />
      <Argument Name="SiteColumnRowOrdinal" Type="System.Int32" >
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="0" />
      </Argument>

    </Arguments>
    <GatheringServiceData>
      <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
        <Pages>
          <Page>
            <Title>Site Column</Title>
            <Fields>
              <Field ValueName="SiteColumnID" Label="ID" />
              <Field ValueName="SiteColumnName" Label="Name" />
              <Field ValueName="SiteColumnDisplayName" Label="Display Name" />
              <Field ValueName="SiteColumnType" Label="Type" />
              <Field ValueName="SiteColumnGroup" Label="Group" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.SharePointConfigurationSiteColumnGroupEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
              <Field ValueName="SiteColumnStaticName" Label="Static Name" />
              <Field ValueName="SiteColumnColName" Label="Column Name" />
              <Field ValueName="SiteColumnRowOrdinal" Label="Row Ordinal" />
              <Field ValueName="SiteColumnReadOnly" Label="Read Only" />
            </Fields>
          </Page>
        </Pages>
      </Wizard>
    </GatheringServiceData>
  <Actions>
    <Action Name="GenerateElement" Template="Text\SiteColumns\singleelement.xml.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
      <Input Name="SiteColumnID" RecipeArgument="SiteColumnID" />
      <Input Name="SiteColumnName" RecipeArgument="SiteColumnName" />
      <Input Name="SiteColumnGroup" RecipeArgument="SiteColumnGroup" />
      <Input Name="SiteColumnStaticName" RecipeArgument="SiteColumnStaticName" />
      <Input Name="SiteColumnType" RecipeArgument="SiteColumnType" />
      <Input Name="SiteColumnDisplayName" RecipeArgument="SiteColumnDisplayName" />
      <Input Name="SiteColumnReadOnly" RecipeArgument="SiteColumnReadOnly" />
      <Input Name="SiteColumnColName" RecipeArgument="SiteColumnColName" />
      <Input Name="SiteColumnRowOrdinal" RecipeArgument="SiteColumnRowOrdinal" />
      <Output Name="Content" />
    </Action>
    <Action Name="AddElementToXml" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddContentToXmlNode, SteriaMummert.SharePoint.SoftwareFactoryLite" TargetNode="/ns:Elements" TargetNamespace="http://schemas.microsoft.com/sharepoint/">
      <Input Name="Content" ActionOutput="GenerateElement.Content" />
      <Input Name="Item" RecipeArgument="CurrentItem" />
    </Action>
  </Actions>
</Recipe>